Fix various version parsing problems#36553
Merged
wxiaoguang merged 2 commits intogo-gitea:mainfrom Feb 8, 2026
Merged
Conversation
Contributor
wxiaoguang
commented
Feb 8, 2026
- handle non-release git verions (not semver)
- fix rubygems version "0" handling (only ">=" can be omitted)
- lazy compile the regexp to improve performance
- make test data maintainable, use origin source code instead of compressed binary
7887192 to
d9d055b
Compare
d9d055b to
ff3ccf1
Compare
TheFox0x7
reviewed
Feb 8, 2026
| ) | ||
|
|
||
| var versionMatcher = regexp.MustCompile(`\A[0-9]+(?:\.[0-9a-zA-Z]+)*(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?\z`) | ||
| var versionMatcher = sync.OnceValue(func() *regexp.Regexp { |
Contributor
There was a problem hiding this comment.
mainly out of curiosity, why behind sync?
Contributor
Author
There was a problem hiding this comment.
- lazy compile the regexp to improve performance
Only compile it when it is needed.
TheFox0x7
approved these changes
Feb 8, 2026
lunny
approved these changes
Feb 8, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Feb 9, 2026
* giteaofficial/main: Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) Fix highlight diff result (go-gitea#36539) Refactor Nuget Auth to reuse Basic Auth Token Validation (go-gitea#36558) Update go dependencies (go-gitea#36548) Prevent navigation keys from triggering actions during IME composition (go-gitea#36540) Fix various mermaid bugs (go-gitea#36547) Add `elk` layout support to mermaid (go-gitea#36486) Allow configuring default PR base branch (fixes go-gitea#36412) (go-gitea#36425) [skip ci] Updated translations via Crowdin Color command/error logs in Actions log (go-gitea#36538) Add paging headers (go-gitea#36521) Fix issues filter dropdown showing empty label scope section (go-gitea#36535) [SECURITY] fix: Adjust the toolchain version (go-gitea#36537) Hide `add-matcher` and `remove-matcher` from actions job logs (go-gitea#36520) Improve timeline entries for WIP prefix changes in pull requests (go-gitea#36518)
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 12, 2026
* origin/main: (34 commits) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) Fix mirror sync parser and fix mirror messages (go-gitea#36504) Update JS and PY deps (go-gitea#36576) Add viewer controller for mermaid (zoom, drag) (go-gitea#36557) Misc typescript tweaks (go-gitea#36523) Use full-file highlighting for diff sections (go-gitea#36561) fix(diff): reprocess htmx content after loading more files (go-gitea#36568) [skip ci] Updated translations via Crowdin Add wrap to runner label list (go-gitea#36565) fix: add dnf5 command for Fedora in RPM package instructions (go-gitea#36527) Enable pagination on GiteaDownloader.getIssueReactions() (go-gitea#36549) Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) ...
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Feb 12, 2026
* origin/main: (152 commits) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) Fix mirror sync parser and fix mirror messages (go-gitea#36504) Update JS and PY deps (go-gitea#36576) Add viewer controller for mermaid (zoom, drag) (go-gitea#36557) Misc typescript tweaks (go-gitea#36523) Use full-file highlighting for diff sections (go-gitea#36561) fix(diff): reprocess htmx content after loading more files (go-gitea#36568) [skip ci] Updated translations via Crowdin Add wrap to runner label list (go-gitea#36565) fix: add dnf5 command for Fedora in RPM package instructions (go-gitea#36527) Enable pagination on GiteaDownloader.getIssueReactions() (go-gitea#36549) Refactor merge conan and container auth preserve actions taskID (go-gitea#36560) Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559) Fix various version parsing problems (go-gitea#36553) ...
Sirherobrine23
pushed a commit
to Sirherobrine23/gitea
that referenced
this pull request
Mar 4, 2026
1. handle non-release git verions (not semver) 2. fix rubygems version "0" handling (only ">=" can be omitted) 3. lazy compile the regexp to improve performance 4. make test data maintainable, use origin source code instead of compressed binary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.